package org.tksj.bim.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.tksj.bim.common.constant.Constants;
import org.tksj.bim.common.mq.MqProducer;
import org.tksj.bim.common.thing.ThingModelMessage;

@RestController
public class TestController {



	@Autowired
	private MqProducer<ThingModelMessage>  mqProducer;


	@GetMapping("/test")
	public  void   getMessage(){

		ThingModelMessage build = ThingModelMessage.builder().id("hello")
				.deviceName("device info")
				.build();
		mqProducer.publish(Constants.THING_MODEL_MESSAGE_TOPIC, build);
	}
}
